<!DOCTYPE HTML>
<html>
	<head>
		<title>form test</title>
		<meta name="viewport" content="width=320;height=420;user-scalable=no;initial-scale=1.0;">
		<script src="../../lib/contrib/jsbn/jsbn.js"></script>
		<script src="../../lib/contrib/jsbn/jsbn2.js"></script>
		<script src="../../lib/big-number.js"></script>
		<script src="../../lib/form.js"></script>
		<script>

			var remember = 0;

			function update_form() {
			}

			var n_n;
			var n_d;
			var n_b;

			function changed_numerator(ns) {
				// alert("changed numerator to " + ns.value);
			}

			function changed_denominator(ns) {
				// alert("changed denominator to " + ns.value);
			}

			function changed_base(ns) {
				// alert("changed base to " + ns.value);
				n_n.change_base(ns.value);
				n_d.change_base(ns.value);
			}

			function init() {
				n_n = new NumberSpinner({
					select: document.getElementById('numerator'),
					min: 0,
					value: 1,
					page_size: 20
				});
				n_n.update();
				n_n.callback = changed_numerator;
				n_d = new NumberSpinner({
					select: document.getElementById('denominator'),
					min: 1,
					value: 7,
					page_size: 20
				});
				n_d.update();
				n_d.callback = changed_denominator;
				n_b = new NumberSpinner({
					select: document.getElementById('base'),
					min: 2,
					value: 10,
					page_size: 20
				});
				n_b.callback = changed_base;
				n_b.update();
			}
		</script>
	</head>
	<body onLoad="init()">
		<select id="numerator" onChange="number_spinner_callback(this)"><option></option></select>
		/
		<select id="denominator" onChange="number_spinner_callback(this)"><option></option></select>
		<br>base
		<select id="base" onChange="number_spinner_callback(this)"><option></option></select>
	</body>
</html>
